package com.mapper;

import com.pojo.Project;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ProjectMapper {
    //查询所有项目信息，根据项目分类id
    public List<Project> selectAllProjects(Map map);
    //插入项目信息
    public int insertProject(Project project);
    //修改项目部分信息
    public int updateProject(Project project);
    //删除项目
    public int deleteProject(long id);
    //根据项目id，查询项目信息
    public Project selectProjectById(long id);
    //修改项目关注人数
    public int updateAttenjian(@Param("id")long id);
    //修改项目关注人数++++
    public int updateAttenjia(@Param("id")long id);
    //根据用户id查询发起项目详情
    public List<Project> selectProjectByuserId(@Param("userId") long userId,@Param("status")String status);
    //发布项目
    public int startProject(Project project);
    //根据typeid查询项目
    public List<Project> selectProjectByTypeId(long typeid);

    //更新项目发布信息
    public int updateStartProject(Project project);
    //查询所有project
    public List<Project> selectProjects();

    //根据项目名查询
    public Project selectProjectByProjectName(String projectName);

    //最终更新项目信息
    public int updataProjectEnd(Project project);
}
